﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Orderconsole
{

    class OrderItem 
    {
        DateTime d = DateTime.Now;
        protected int ProductMoney, ProductCount;
        public override string ToString()
        {
            return "商品单价" + this.ProductMoney + "商品数量" + this.ProductCount + "当前时间为 " + this.d;

        }
        public override bool Equals(object obj)
        {
            var orderitem = obj as OrderItem;
            return orderitem != null &&
                 ProductMoney == orderitem.ProductMoney
                && ProductCount == orderitem.ProductCount;


        }


    }
}
